import {request} from "./request";

export function getCourseListAPI(params) {

    return request({
        url:'/api/course/getCourseList',
        method:'Post',
        data:{
            "categoryId":params.cateId,
            "teachType":params.teachType,
            "sortType":params.sortType,
            "startPrice":params.startPrice,
            "endPrice":params.endPrice,
            "priceType":params.priceType,
            "pageNo":params.pageNo,
            "pageSize":params.pageSize
        }

    })

}

export function getCourseDetailAPI(id) {

    return request({
        url:'/api/course/'+id
    })

}

export function buyCourseAPI(id) {
    return request({
        url:'/api/course-order/'+id,
        method:'Post'
    })
}

export function getLessonPlanAPI(id) {
    return request({
        url:'/api/lesson-plan/'+id,
        method:'Get'
    })

}

export function getCourseApi(priceType) {
    return request({
        url:'/api/course/getCourseList',
        method: 'post',
        data:{
            priceType:priceType
        }
    })
}
export function getFaceCourseApi(teachType) {
    return request({
        url:'/api/course/getCourseList',
        method: 'post',
        data:{
            teachType:teachType
        }
    })
}